package am.NotenProgramm.Frame;

import java.util.Locale;
import java.util.ResourceBundle;

import am.NotenProgramm.IO.*;
import am.NotenProgramm.objects.*;

public class GradePro {

	public static final String versionNum = "0.2.0";
	
	public static MainFrame mainFrame;

	public static DataStream myStream = new DataStream();
	public static SettingsData mySettings;
	static Locale currentLocale;
	public static ResourceBundle rb;
	
	public static Profile myProfile;

	public static void main(String[] args) {
		mySettings = myStream.loadSettings();
		currentLocale = new Locale(mySettings.getLanguage());
		rb = ResourceBundle.getBundle("MessagesBundle", currentLocale);
		myProfile = myStream.loadProfile(mySettings.getStandartProfileName());
		mainFrame = new MainFrame();
	}
	
	public static void restart() {
		mainFrame.dispose();
		mySettings = myStream.loadSettings();
		currentLocale = new Locale(mySettings.getLanguage());
		rb = ResourceBundle.getBundle("MessagesBundle", currentLocale);
		myProfile = myStream.loadProfile(mySettings.getStandartProfileName());
		mainFrame = new MainFrame();
	}

}
